import requests

from likeshop_api_project.api.handleCollectGoods_api import handleCollectGoods_model
from likeshop_api_project.api.huoqudiqu_api import huoqudiqu_model
from likeshop_api_project.base.myBase import Tools
from likeshop_api_project.api.login_api import login_model

class getdizhixiangxi_model(Tools):
    path = '/api/user_address/detail'

    # 发送查询任务接口
    def getdizhixiangxi_action(self,hd,id):
        getdizhixiangxi_data = {
            "id":id
        }

        getdizhixiangxi = self.huihua.get(url=self.hosturl + self.path, params=getdizhixiangxi_data, headers=hd)
        return getdizhixiangxi.json()


s = requests.session()
login = login_model(huihua=s)
msg = login.login_action(account='17612345678', pwd='admin123', client='4')
print(msg)
tokena = msg['data']['token']
hd = {
    'token': tokena
}
print(hd)

getdizhixiangxi = getdizhixiangxi_model(huihua=s)
msg = getdizhixiangxi.getdizhixiangxi_action(id=834, hd=hd)
print(msg)